package com.hs.service.impl;

import com.hs.entity.Major;
import com.hs.mapper.MajorMapper;
import com.hs.service.MajorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MajorServiceImpl implements MajorService {

    @Autowired
    private MajorMapper majorMapper;

    //根据id查询专业名称
    @Override
    public Integer findIdByName(String name) {
        return majorMapper.findIdByName(name);
    }

    //查询专业列表
    @Override
    public List<Major> queryMajorList() {
        return majorMapper.queryMajorList();
    }
}
